package com.lg.transaction;


import com.lg.rocketmq.annotation.MQTransactionProducer;
import com.lg.rocketmq.base.AbstractMQTransactionProducer;
import org.apache.rocketmq.client.producer.LocalTransactionState;

/**
 *
 **/
@MQTransactionProducer(producerGroup = "demo", topic = "TopicTest", tag = "Hello")
public class DemoListener extends AbstractMQTransactionProducer {
    @Override
    public LocalTransactionState getLocalTransaction(Object o) {
        System.out.println(o);
        return LocalTransactionState.COMMIT_MESSAGE;
    }

    @Override
    public LocalTransactionState checkLocalTransaction(Object o) {
        System.out.println(o);
        return LocalTransactionState.COMMIT_MESSAGE;
    }
}
